<style>
.tab-pane{
	position: relative; 
	margin: 10px;
}
.box-footer{
	margin-left: 50px;
	padding-bottom: 20px;
}
.filter-ul{
	padding: 10px 12px;
    margin: 0;
}
li.li-inline {
    display: inline-block;
    margin: 4px 5px;
    padding: 0;
    min-height: 28px;
    max-width: 80%;
    line-height: 28px;
    vertical-align: middle;
}
#search-btn {
    position: absolute;
    right: 10px;
    bottom: 10px;
}
.tab-content{
	overflow-x: auto;
}
.p_s_rolename{
	float: right;
	margin-left: 5px;
	margin-top: -3px;
}
.content {
    padding: 20px 15px;
    background: #f9f9f9;
    overflow: unset;
}
.p_s_openid{
	float: left;
	margin-left: 5px;
	margin-top: -3px;
}
.openid_line{
	float: left;
	width: 100%;
	line-height: 25px;
}
</style>
<link rel="stylesheet" type="text/css" href="/public/static/plugin/inputSearch/autocomplete.css" />
<!-- searchableSelect -->
<link rel="stylesheet" type="text/css" href="/public/static/plugin/searchableSelect/jquery.searchableSelect.css" />
    <{include file='../common_params.tpl'}>
    	
    <div id="once-filter" class="box box-black">
    	<div>
    		<ul class="filter-ul">
    			<li class="li-inline">
    				<label for="exampleInputFile">专服</label>
    	            <select class="form-control inline" name="special" id="special">
                    <{html_options options=$specialList selected=$server}>
                    </select>
    			</li>
    			<li class="li-inline" id="server_li">
    				<label for="exampleInputFile">服务器</label>
    	            <select class="form-control inline" name="server" id="server">
                    <{html_options options=$serverList selected=$server}>
                    </select>
    			</li>
    			<li class="li-inline">
    				<label for="exampleInputFile" id="l_type">类型</label>
    				<select class="form-control inline" name="s_type" id="s_type">
    					<option value="1">按角色名称</option>
    					<option value="2">按角色ID</option>
    				</select>	
    			</li>	
    			<li class="li-inline">
    				<label for="exampleInputFile" id="r_ti">角色名称</label>
    				<div class="p_s_rolename"></div>
    	            <!--<input class="form-control inline" type="text" id="roleId" name="rolrId" value="" /> -->
    			</li>
    		</ul>
    	</div>
    	    
    	<button id="search-btn" class="btn btn-default btn-flat"><i class="fa fa-search"></i>查询</button>    	
    </div>
    
    
    
    <div class="nav-tabs-custom" style="display: none;" id="players">   	    
            <ul class="nav nav-tabs">
            	<{foreach from=$tabList item=item key=key}>
                    <li><a data-toggle="tab" id="grid-<{$key}>" class="grid-tab" href="#<{$key}>"><{$item}></a></li>
                <{/foreach}>
                	
            	<!--<li><a data-toggle="tab" class="grid-tab" href="#2">基本信息</a></li>
                <li><a data-toggle="tab" class="grid-tab" href="#2">身上装备</a></li>
                <li><a data-toggle="tab" class="grid-tab" href="#3">背包物品</a></li>
                <li><a data-toggle="tab" class="grid-tab" href="#4">玩家技能</a></li>
                <li><a data-toggle="tab" class="grid-tab" href="#5">玩家属性</a></li>
                <li><a data-toggle="tab" class="grid-tab" href="#6">玩家符文</a></li>
                <li><a data-toggle="tab" class="grid-tab" href="#7">玩家聚魂</a></li>
                <li><a data-toggle="tab" class="grid-tab" href="#8">玩家称号</a></li>
                <li><a data-toggle="tab" class="grid-tab" href="#9">玩家时装</a></li>
                <li><a data-toggle="tab" class="grid-tab" href="#10">玩家剑魂</a></li>
                <li><a data-toggle="tab" class="grid-tab" href="#11">玩家幻形</a></li>
                <li><a data-toggle="tab" class="grid-tab" href="#12">玩家帮派</a></li>
                <li><a data-toggle="tab" class="grid-tab" href="#13">玩家成就</a></li>-->
            </ul>

            <div class="tab-content no-padding">
            	<{foreach from=$tabList item=item key=key}>
            		<div id="<{$key}>" class="tab-pane active" data-type="<{$key}>">
                	
                    </div>
            	<{/foreach}>	
            		
                <!--<div id="1" class="tab-pane active" data-type="1">
                	aaaaa
                </div>
                
                <div id="2" class="tab-pane active" data-type="2">
                	bbbbb
                </div>
                
                
                <div id="3" class="tab-pane active" data-type="3">
                	ccccc
                </div>
                
                <div id="4" class="tab-pane active" data-type="4">
                	ddddd
                </div>
                
                <div id="5" class="tab-pane active" data-type="5">
                	eeeee
                </div>
                
                <div id="6" class="tab-pane active" data-type="6">
                	fffff
                </div>
                
                <div id="7" class="tab-pane active" data-type="7">
                	ggggg
                </div>
                
                <div id="8" class="tab-pane active" data-type="8">
                	hhhhh
                </div>
                
                <div id="9" class="tab-pane active" data-type="9">
                	iiiii
                </div>
                
                <div id="10" class="tab-pane active" data-type="10">
                	jjjjj
                </div>
                
                <div id="11" class="tab-pane active" data-type="11">
                	kkkkk
                </div>
                
                <div id="12" class="tab-pane active" data-type="12">
                	lllll
                </div>
                
                <div id="13" class="tab-pane active" data-type="13">
                	mmmmm
                </div>-->
                
            </div>
            
            <div class="box-footer">
            	<!--<a href="javascript:history.go(-1);" class="btn btn-default">返回</a>-->
            </div>
     </div>
    
    <div id="once-filter-openid" class="nav-tabs-custom" style="padding: 15px; height: 80px;">
    	<div style="float: left;width: 100%;margin-bottom: 20px;">
    		<div style="float: left;padding-top: 5px;padding-right: 10px;">平台用户ID</div>
    	    <div class="p_s_openid"></div>
    	    <button id="search-openid" class="btn btn-default btn-flat"><i class="fa fa-search"></i>查询</button>   
       </div>
       <div style="float: left;" id="show_role">
       	   <!--<div class="openid_line">角色名称 -- 角色ID -- 的数据富家大室-- 京东方尽快</div>
       	   <div class="openid_line">角色名称 -- 角色ID -- 的数据富家大室-- 京东方尽快</div>
       	   <div class="openid_line">角色名称 -- 角色ID -- 的数据富家大室-- 京东方尽快</div>
       	   <div class="openid_line">角色名称 -- 角色ID -- 的数据富家大室-- 京东方尽快</div>-->
       </div>
    </div>


<script>
    $(function(){
    	$('#search-btn').click(function(){
    		//var roleId = $("#roleId").val();
    		var roleId = $('input[name="roleId"]').val();
    		if(roleId == ''){
    			var s_type = $('select[name="s_type"]').val();
    			if(s_type == 1){
    			  layer.msg('请输入角色名称', {icon: 2,time: 3000});
    		    }
    		    if(s_type == 2){
    			   layer.msg('请输入角色ID', {icon: 2,time: 3000});
    		    }   			
    		}else{
    			$("#players").show();   			
  			    if($("a.grid-tab").length > 0) $("a.grid-tab").first().click();
    		}
    	});
    	
    	$('#search-openid').click(function(){
    		var openid = $('input[name="openid"]').val();
    		if(openid == ''){
    			layer.msg('请输入平台用户ID', {icon: 2,time: 3000});
    		}else{
    			//查询平台用户ID下的角色信息
    			var g = $('input[name="g"]').val();
	            var url = '?r=player/getRoleForOpenId&g='+g;
          	    $.ajax({
	        	   type : 'POST',
	        	   url : url,
	        	   async:false,
	        	   data : {'openid':openid},
		           dataType :'JSON',
		           success : function(res){
		        	   if(res.status){
		        	   	 var length = res.data.length;
		        	   	 var height = 80 + length * 25;
		        	   	 $("#once-filter-openid").css('height',height);
		        	   	 var html = '';
		        	   	 for(var i=0;i<length;i++){
		        	   	 	//console.log(res.data[i].server);
		        	   	 	var div = '<div class="openid_line">'+res.data[i].server+' -- '+res.data[i].rolename+' -- '+res.data[i].roleid+' -- '+res.data[i].level+'</div>';
		        	   	 	html += div;
		        	   	 }
		        	   	 $('#show_role').html(html);
					     //layer.alert('查询成功', {icon: 1, skin: 'layui-layer-molv'});
			           }else{
			        	 layer.alert('查询失败', {icon: 2, skin: 'layui-layer-molv'});	
			           }
		           }
	            });
    		}
    	});
    	
    	$(document).on('change','select[name = "s_type"]',function(){
    		var s_type = $(this).val();
    		if(s_type == 1){
    			$("#r_ti").text('角色名称');
    		}
    		if(s_type == 2){
    			$("#r_ti").text('角色ID');
    		}
    	});
    	
    	
    	
    	$("a.grid-tab").click(function(){
    		var href = $(this).attr('href');
    		var url ="?r=player/search_info&g=<{$game}>";
    		var type = $(href).attr('data-type');
    		//var roleId = $("#roleId").val();
    		var roleId = $('input[name="roleId"]').val();
    		var server = $("#server").val();
    		var s_type = $('select[name="s_type"]').val();
    		ajax(url,roleId,server,href,type,s_type);

    	});
    	
        $(document).on('change','select[name = "good_type"]',function(){
        	var href = $(this).attr('href');
    	    var url ="?r=player/search_info&g=<{$game}>";
    	    var type = $(href).attr('data-type');
    	    var good_type = $(this).val();
    	    //var roleId = $("#roleId").val();
    	    var roleId = $('input[name="roleId"]').val();
    	    var server = $("#server").val();
    	    var s_type = $('select[name="s_type"]').val();
    	    ajaxGood(url,roleId,server,href,type,good_type,s_type);
        });
        
        $(document).on('change','select[name = "skill_type"]',function(){
        	var href = $(this).attr('href');
    	    var url ="?r=player/search_info&g=<{$game}>";
    	    var type = $(href).attr('data-type');
    	    var skill_type = $(this).val();
    	    //var roleId = $("#roleId").val();
    	    var roleId = $('input[name="roleId"]').val();
    	    var server = $("#server").val();
    	    var s_type = $('select[name="s_type"]').val();
    	    ajaxSkill(url,roleId,server,href,type,skill_type,s_type);
        });
        
        
        $(document).on('click','#guild',function(){
        	//console.log('1234567890');
        	$("#grid-12").click();
        });
        
        $(document).on('click','input[name = "op_type"]',function(){
        	var g = $('input[name="g"]').val();
	        var url = '?r=player/setMarket&g='+g;
        	var op_type = $(this).val();
        	var market_uid = $("#market_uid").val();
        	var server = $("#server").val();
        	//console.log(market_uid);
          	$.ajax({
	        	type : 'POST',
	        	url : url,
	        	async:false,
	        	data : {'op_type':op_type,'market_uid':market_uid,'server':server},
		        dataType :'JSON',
		        success : function(res){
		        	if(res.state){		        		
					   layer.alert('设置成功', {icon: 1, skin: 'layui-layer-molv'});
			        }else{
			        	layer.alert('设置失败', {icon: 2, skin: 'layui-layer-molv'});
			        	
			        }
		        }
	        });
        });
        
        function ajaxGood(url,roleId,server,href,type,good_type,s_type){
    		$.ajax({
    			type : 'POST',
    			url : url,
				data : {'roleId':roleId,'server':server,'type':type,'good_type':good_type,'s_type':s_type},
				dataType :'html',
				success : function(res){
					$(href).html(res);
				}
			});
    	}
        
        function ajaxSkill(url,roleId,server,href,type,skill_type,s_type){
    		$.ajax({
    			type : 'POST',
    			url : url,
				data : {'roleId':roleId,'server':server,'type':type,'skill_type':skill_type,'s_type':s_type},
				dataType :'html',
				success : function(res){
					$(href).html(res);
				}
			});
    	}
        
        
    	
    	
    	function ajax(url,roleId,server,href,type,s_type){
    		$.ajax({
    			type : 'POST',
    			url : url,
				data : {'roleId':roleId,'server':server,'type':type,'s_type':s_type},
				dataType :'html',
				success : function(res){
					$(href).html(res);
				}
			});
    	}

    });
    
    
    
</script>

<script src="/public/static/plugin/inputSearch/autocomplete.js"></script>
<!-- searchableSelect -->
<script src="/public/static/plugin/searchableSelect/jquery.searchableSelect.js"></script>
<!-- searchableSelect -->
<script>
	
$(document).on('keyup','input[name="roleId"]',function(){
	//console.log($(this).val());
	
});

var proposals = {};


//根据道具名称搜索出道具id
var sub = function(val,input){
};

var blur =function(val,input){
};

var search = function(val){
	var data = selectGoods(val);
	return data;
};

var osub = function(val,input){
};

var oblur =function(val,input){
};

var osearch = function(val){
	var data = selectOpenId(val);
	return data;
};

	
$(document).ready(function(){
	$('.p_s_rolename').autocomplete({
		placeholder: '',
		hints: proposals,
		width: 150,
		height: 34,
		showButton: false,
		name:'roleId',
		onSubmit: sub,
		onBlur:blur,
		search:search
	});
	
	$('.p_s_openid').autocomplete({
		placeholder: '平台用户ID',
		hints: proposals,
		width: 150,
		height: 34,
		showButton: false,
		name:'openid',
		onSubmit: osub,
		onBlur:oblur,
		search:osearch
	});
});


function selectGoods(val){
	var g = $('input[name="g"]').val();
	var url = '?r=player/autoComplete&g='+g;
	var server = $("#server").val();
	var s_type = $('select[name="s_type"]').val();
	var json = '';
	$.ajax({
    	type : 'POST',
    	url : url,
    	async:false,
		data : {'val':val,'server':server,'s_type':s_type},
		dataType :'JSON',
		success : function(res){
			if(res.status == 1){
				json = res.data;
			}else{
				layer.msg(res.msg, {icon: 5});
				return false;
			}
		}
	});
	return json;
}

function selectOpenId(val){
	var g = $('input[name="g"]').val();
	var url = '?r=player/autoOpenId&g='+g;
	var json = '';
	$.ajax({
    	type : 'POST',
    	url : url,
    	async:false,
		data : {'val':val},
		dataType :'JSON',
		success : function(res){
			if(res.status == 1){
				json = res.data;
			}else{
				layer.msg(res.msg, {icon: 5});
				return false;
			}
		}
	});
	return json;
}


</script>

<script>
	var onChange_os = function(val){
        var special_id = val;
        var os = 'ALL';
        var g = $("input[name='g']").val();
        var url = '/oss/?r=channel/getServer&g='+g;
        $.ajax({
        	type : 'POST',
        	url : url,
        	data : {'os':os,'g':g,'special_id':special_id},
			dataType :'JSON',
			success : function(res){
			    if(res.status == 1){
			        var option = '';
					for (var i=0;i<res.data.list.length;i++){
						option += "<option value='"+res.data.list[i]['id']+"'>"+res.data.list[i]['server_name']+" ("+res.data.list[i]['server_num']+")</option>";
					}
				    	                        
				    $('select[name="server"]').empty();
					$('select[name="server"]').append(option);
					$('#server_li').text('');
					    
					var select = '<label for="exampleInputFile">服务器&nbsp;</label><select class="form-control" name="server" id="server">'+option+'</select>';
					$('#server_li').html(select);
					$('#server_li').find('select[name="server"]').searchableSelect({width: 180,size: 12,height: 25,padding1: 1,padding2: 6,top : 4,right: 7});
				}else{
				    $('select[name="server"]').empty();
				}
			}
	    });
    };
$('select[name="special"]').searchableSelect({width: 180,size: 12,height: 25,padding1: 1,padding2: 6,top : 4,right: 7,onChange:onChange_os});	
//$('select[name="server"]').searchableSelect({width: 180,size: 12,height: 25,padding1: 1,padding2: 6,top : 4,right: 7});

                                
</script>

<script>

	//账号封禁
	$(document).on('click','a[name="ban_user"]',function(){
		//console.log('ban_user');
		var accountid = $("#b_accountid").text();
        if(accountid == ''){
            layer.msg('缺少账号!', {icon: 2,time: 3000});
            return false;
        }
		var data_url = $('a[name="ban_user"]').attr('data-url');
        var g = $("input[name='g']").val();
        var url = data_url+'&g='+g;
        var loading = null;
		layer.open({
    		    skin: 'layui-layer-molv'
    		    ,btn: ['取消', '确定']
    			,type: 2
    			,area: ['500px', '400px']
    			,title:'账号封禁'
    			,content: url
    			,yes: function(index, layero){
                   //按钮【按钮一】的回调
                  layer.close(index);
                   
                }
                ,btn2: function(index, layero){
                   //按钮【按钮二】的回调
                   var iframeWin = window["layui-layer-iframe" + index];
                   var arr = iframeWin.callbackdata();
                   if(arr[0] == '' && arr[1] == 2){
                   	   layer.msg('请设置封禁截止时间', {icon: 2,time: 3000});
                   	   return false;
                    }
                   var server_id = $("#server").val();
                   var ban_type = 1;//按账号
                   var status = 1; //1封禁0解封
                   var accountid = $("#b_accountid").text(); //账号
                   var ban_date = arr[0]; //截止时间
                   var ban_forever = arr[1]; //1永久，2按设置的时间
                   var reason = arr[2];//原因
                   if(accountid == ''){
                   	  layer.msg('缺少账号!', {icon: 2,time: 3000});
                   	  return false;
                   }

                   uploading = layer.load(1, {shade: [0.4, '#393D49']});
                   var flag = true;
                   $.ajax({
        	        	type : 'POST',
    			        url : url,
				        data : {'server_id':server_id,'ban_type':ban_type,'status':status,'accountid':accountid,'ban_date':ban_date,'ban_forever':ban_forever,'reason':reason},
				        dataType :'JSON',
				        async: false,
				        success : function(res){
				        	layer.close(uploading);
				        	if(res.status == 1){	
				        		layer.alert(res.msg, {
				        			skin: 'layui-layer-molv' //样式类名
						            ,closeBtn: 0
					           }, function(){					            	
					            	layer.msg('ok',{time:100});
						            $("a.grid-tab").first().click(); //重新加载基本信息
					            });
				        		//layer.alert(res.msg, {skin: 'layui-layer-molv'});
					        }else{
						        layer.alert(res.msg, {icon: 2, skin: 'layui-layer-molv'});
						        flag = false;
						        //return false;
					        }
				        }
			        });
                   
                   if(flag == false){
                   	  return false;
                   }
                   //return false;
                  
                },cancel: function(){                 	
                   //右上角关闭回调   
                   //return false 开启该代码可禁止点击该按钮关闭
                }
        });   
	});
	
	//解封
	$(document).on('click','a[name="ban_untie"]',function(){
		//console.log('ban_untie');
		var accountid = $("#b_accountid").text();
        if(accountid == ''){
            layer.msg('缺少账号!', {icon: 2,time: 3000});
            return false;
        }
		var data_url = $('a[name="ban_untie"]').attr('data-url');
        var g = $("input[name='g']").val();
        var url = data_url+'&g='+g;
        var loading = null;
        
		layer.confirm('是否要解封？', {
    			btn: ['确定','取消'],
    			skin: 'layui-layer-molv'
    	}, function(){
    		    var ts = Math.round(new Date().getTime()/1000).toString();
    		    var server_id = $("#server").val();
                var ban_type = 1;//按账号
                var status = 0; //1封禁0解封
                var accountid = $("#b_accountid").text(); //账号
                var ban_date = ts; //截止时间
                var ban_forever = 2; //1永久，2按设置的时间
                var reason = '';//原因
    		    
    		    $.ajax({
    		    	type : 'POST',
    			    url : url,
				    data : {'server_id':server_id,'ban_type':ban_type,'status':status,'accountid':accountid,'ban_date':ban_date,'ban_forever':ban_forever,'reason':reason},
				    dataType :'JSON',
				    success : function(res){
					    if(res.status == 1){
                            layer.alert(res.msg, {
				        			skin: 'layui-layer-molv' //样式类名
						            ,closeBtn: 0
					           }, function(){					            	
					            	layer.msg('ok',{time:100});
						            $("a.grid-tab").first().click(); //重新加载基本信息
					           }); 
					    }else{
					    	layer.alert(res.msg, {icon: 2, skin: 'layui-layer-molv'});					    	
					    }
				    }
			    });

    		}, function(){

            });
	});
	
	//禁言
	$(document).on('click','a[name="shutup_user"]',function(){
		console.log('shutup_user');
		var rolename = $("#b_rolename").text();
        if(rolename == ''){
            layer.msg('缺少角色名称!', {icon: 2,time: 3000});
            return false;
        }
		var data_url = $('a[name="shutup_user"]').attr('data-url');
        var g = $("input[name='g']").val();
        var url = data_url+'&g='+g;
        var loading = null;
		layer.open({
    		    skin: 'layui-layer-molv'
    		    ,btn: ['取消', '确定']
    			,type: 2
    			,area: ['500px', '400px']
    			,title:'角色禁言'
    			,content: url
    			,yes: function(index, layero){
                   //按钮【按钮一】的回调
                  layer.close(index);
                   
                }
                ,btn2: function(index, layero){
                   //按钮【按钮二】的回调
                   var iframeWin = window["layui-layer-iframe" + index];
                   var arr = iframeWin.callbackdata();
                   if(arr[0] == '' && arr[1] == 2){
                   	   layer.msg('请设置封禁截止时间', {icon: 2,time: 3000});
                   	   return false;
                    }
                   var server_id = $("#server").val();
                   var ban_channel = arr[3];//封禁频道
                   var status = 1; //1封禁0解封
                   var rolename = $("#b_rolename").text(); //角色名称
                   var ban_date = arr[0]; //截止时间
                   var ban_forever = arr[1]; //1永久，2按设置的时间
                   var reason = arr[2];//原因
                   if(rolename == ''){
                   	  layer.msg('缺少角色名称!', {icon: 2,time: 3000});
                   	  return false;
                   }

                   uploading = layer.load(1, {shade: [0.4, '#393D49']});
                   var flag = true;
                   $.ajax({
        	        	type : 'POST',
    			        url : url,
				        data : {'server_id':server_id,'ban_channel':ban_channel,'status':status,'rolename':rolename,'ban_date':ban_date,'ban_forever':ban_forever,'reason':reason},
				        dataType :'JSON',
				        async: false,
				        success : function(res){
				        	layer.close(uploading);
				        	if(res.status == 1){	
				        		layer.alert(res.msg, {
				        			skin: 'layui-layer-molv' //样式类名
						            ,closeBtn: 0
					           }, function(){					            	
					            	layer.msg('ok',{time:100});
						            $("a.grid-tab").first().click(); //重新加载基本信息
					            });
				        		//layer.alert(res.msg, {skin: 'layui-layer-molv'});
					        }else{
						        layer.alert(res.msg, {icon: 2, skin: 'layui-layer-molv'});
						        flag = false;
						        //return false;
					        }
				        }
			        });
                   
                   if(flag == false){
                   	  return false;
                   }
                   //return false;
                  
                },cancel: function(){                 	
                   //右上角关闭回调   
                   //return false 开启该代码可禁止点击该按钮关闭
                }
        });
	});
	
	//解禁
	$(document).on('click','a[name="shutup_untie"]',function(){
		console.log('shutup_untie');
        var rolename = $("#b_rolename").text();
        if(rolename == ''){
            layer.msg('缺少角色名称!', {icon: 2,time: 3000});
            return false;
        }
		var data_url = $('a[name="shutup_untie"]').attr('data-url');
        var g = $("input[name='g']").val();
        var url = data_url+'&g='+g;
        var loading = null;
        
		layer.confirm('是否要解封？', {
    			btn: ['确定','取消'],
    			skin: 'layui-layer-molv'
    	}, function(){
    		    var ts = Math.round(new Date().getTime()/1000).toString();
    		    var server_id = $("#server").val();
                var ban_channel = 0;////封禁频道
                var status = 0; //1封禁0解封
                var rolename = $("#b_rolename").text(); //角色名称
                var ban_date = ts; //截止时间
                var ban_forever = 2; //1永久，2按设置的时间
                var reason = '';//原因
    		    
    		    $.ajax({
    		    	type : 'POST',
    			    url : url,
				    data : {'server_id':server_id,'ban_channel':ban_channel,'status':status,'rolename':rolename,'ban_date':ban_date,'ban_forever':ban_forever,'reason':reason},
				    dataType :'JSON',
				    success : function(res){
					    if(res.status == 1){
                            layer.alert(res.msg, {
				        			skin: 'layui-layer-molv' //样式类名
						            ,closeBtn: 0
					           }, function(){					            	
					            	layer.msg('ok',{time:100});
						            $("a.grid-tab").first().click(); //重新加载基本信息
					           }); 
					    }else{
					    	layer.alert(res.msg, {icon: 2, skin: 'layui-layer-molv'});					    	
					    }
				    }
			    });

    		}, function(){

            });
	});
</script>